import 'package:app/pages/contract_module/contract_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../common/colors.dart';
import '../../../common/tool.dart';
import '../../../components/base_scaffold_appbar.dart';
import 'contract_detail_controller.dart';

class ContractDetailView extends GetView{

  ContractDetailControoler controller = Get.put(ContractDetailControoler());

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar:BaseAppBar(preferredSize: Size(Get.width, AppTool.appBarHEIGHT),
      child: Text('合同详情'),),
      // AppBar(
      //   backgroundColor: AppColor.themeColor,
      //   title:  Text('详情'),
      //   leading: IconButton(
      //     onPressed: () {
      //       Get.back();
      //     },
      //     icon: Image.asset(
      //       'images/leftarr.png',
      //       color: Colors.white,
      //       width: 15,
      //       height: 15,
      //     ),
      //   ),
      // ),
      body: GetBuilder<ContractDetailControoler>(builder: (_){
        return Container(
          padding: EdgeInsets.all(15),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                height: 40,
                color: Colors.white,
                alignment: Alignment.centerLeft,
                child: Text('合同名称：${controller.model?.data?.name}'),
              ),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('员工名称：${controller.model?.data?.employeeName}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('开始时间：${controller.model?.data?.dateStart}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('结束时间：${controller.model?.data?.dateEnd}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('状态：${controller.model?.data?.state}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('是否关注：${controller.model?.data?.isFocus}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('薪水：${controller.model?.data?.wage}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('工作安排：${controller.model?.data?.workTime}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('岗位：${controller.model?.data?.jobName}')),
              Divider(),
              Container(
                  height: 40,
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  child: Text('备注：${controller.model?.data?.notes}')),
              Divider(),
            ],
          ),
        );
      }),
    );
  }

}